package bb.lanxing.device.sgdevcie.setting.fragment.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;

import androidx.annotation.NonNull;

import bb.lanxing.R;
import bb.lanxing.databinding.ItemBikeComputerDeviceListBinding;
import bb.lanxing.lib.devices.sgsettingentity.gearprofile.Gear;

public class GearAdapter extends BaseQuickAdapter<Gear, BaseDataBindingHolder<ItemBikeComputerDeviceListBinding>>
        implements LoadMoreModule {

    public GearAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NonNull BaseDataBindingHolder<ItemBikeComputerDeviceListBinding> baseDataBindingHolder,
            Gear gear) {
        baseDataBindingHolder.setText(R.id.bike_name, gear.getName());

        if (gear.getActivated()) {
            baseDataBindingHolder.setText(R.id.txt_gear_using, R.string.device_add_bike_profile_using);
        } else {
            // baseDataBindingHolder.setText(R.id.txt_gear_using,R.string.device_add_bike_profile_using);
        }
    }
}
